#ifndef __WINHTTP_CONSTANT_H__
#define __WINHTTP_CONSTANT_H__

#define HTTPREQUEST_SETCREDENTIALS_FOR_SERVER  0
#define HTTPREQUEST_SETCREDENTIALS_FOR_PROXY   1
#define HTTPREQUEST_PROXYSETTING_DEFAULT       0
#define HTTPREQUEST_PROXYSETTING_PRECONFIG     0
#define HTTPREQUEST_PROXYSETTING_DIRECT        1
#define HTTPREQUEST_PROXYSETTING_PROXY         2

enum WinHttpRequestOption
{
    WinHttpRequestOption_UserAgentString = 0,
    WinHttpRequestOption_URL = 1,
    WinHttpRequestOption_URLCodePage = 2,
    WinHttpRequestOption_EscapePercentInURL = 3,
    WinHttpRequestOption_SslErrorIgnoreFlags = 4,
    WinHttpRequestOption_SelectCertificate = 5,
    WinHttpRequestOption_EnableRedirects = 6,
    WinHttpRequestOption_UrlEscapeDisable = 7,
    WinHttpRequestOption_UrlEscapeDisableQuery = 8,
    WinHttpRequestOption_SecureProtocols = 9,
    WinHttpRequestOption_EnableTracing = 10,
    WinHttpRequestOption_RevertImpersonationOverSsl = 11,
    WinHttpRequestOption_EnableHttpsToHttpRedirects = 12,
    WinHttpRequestOption_EnablePassportAuthentication = 13,
    WinHttpRequestOption_MaxAutomaticRedirects = 14,
    WinHttpRequestOption_MaxResponseHeaderSize = 15,
    WinHttpRequestOption_MaxResponseDrainSize = 16,
    WinHttpRequestOption_EnableHttp1_1 = 17,
    WinHttpRequestOption_EnableCertificateRevocationCheck = 18,
    WinHttpRequestOption_RejectUserpwd = 19
};
enum WinHttpRequestAutoLogonPolicy
{
    AutoLogonPolicy_Always = 0,
    AutoLogonPolicy_OnlyIfBypassProxy = 1,
    AutoLogonPolicy_Never = 2
};
enum WinHttpRequestSslErrorFlags
{
    SslErrorFlag_UnknownCA = 256,
    SslErrorFlag_CertWrongUsage = 512,
    SslErrorFlag_CertCNInvalid = 4096,
    SslErrorFlag_CertDateInvalid = 8192,
    SslErrorFlag_Ignore_All = 13056
};
enum WinHttpRequestSecureProtocols
{
    SecureProtocol_SSL2 = 8,
    SecureProtocol_SSL3 = 32,
    SecureProtocol_TLS1 = 128,
    SecureProtocol_TLS1_1 = 512,
    SecureProtocol_TLS1_2 = 2048,
    SecureProtocol_ALL = 168
};
enum WinHTTPStatusCodes {
	HTTP_STATUS_CONTINUE = 100, HTTP_STATUS_SWITCH_PROTOCOLS = 101, HTTP_STATUS_OK = 200, HTTP_STATUS_CREATED = 201, HTTP_STATUS_ACCEPTED = 202, 
	HTTP_STATUS_PARTIAL = 203, HTTP_STATUS_NO_CONTENT = 204, HTTP_STATUS_RESET_CONTENT = 205, HTTP_STATUS_PARTIAL_CONTENT = 206, 
	HTTP_STATUS_WEBDAV_MULTI_STATUS = 207, HTTP_STATUS_AMBIGUOUS = 300, HTTP_STATUS_MOVED = 301, HTTP_STATUS_REDIRECT = 302,
	HTTP_STATUS_REDIRECT_METHOD = 303, HTTP_STATUS_NOT_MODIFIED = 304, HTTP_STATUS_USE_PROXY = 305, HTTP_STATUS_REDIRECT_KEEP_VERB = 307,
	HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_DENIED = 401, HTTP_STATUS_PAYMENT_REQ = 402, HTTP_STATUS_FORBIDDEN = 403, 
	HTTP_STATUS_NOT_FOUND = 404, HTTP_STATUS_BAD_METHOD = 405, HTTP_STATUS_NONE_ACCEPTABLE = 406, HTTP_STATUS_PROXY_AUTH_REQ = 407,
	HTTP_STATUS_REQUEST_TIMEOUT = 408, HTTP_STATUS_CONFLICT = 409, HTTP_STATUS_GONE = 410, HTTP_STATUS_LENGTH_REQUIRED = 411,
	HTTP_STATUS_PRECOND_FAILED = 412, HTTP_STATUS_REQUEST_TOO_LARGE = 413, HTTP_STATUS_URI_TOO_LONG = 414, HTTP_STATUS_UNSUPPORTED_MEDIA = 415,
	HTTP_STATUS_RETRY_WITH = 449, HTTP_STATUS_SERVER_ERROR = 500, HTTP_STATUS_NOT_SUPPORTED = 501, HTTP_STATUS_BAD_GATEWAY = 502, 
	HTTP_STATUS_SERVICE_UNAVAIL = 503, HTTP_STATUS_GATEWAY_TIMEOUT = 504, HTTP_STATUS_VERSION_NOT_SUP = 505
};
enum  WinHTTPErrorMessages {
	ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR = 12178, ERROR_WINHTTP_AUTODETECTION_FAILED = 12180, ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT = 12166,
	ERROR_WINHTTP_CANNOT_CALL_AFTER_OPEN = 12103, ERROR_WINHTTP_CANNOT_CALL_AFTER_SEND = 12102, ERROR_WINHTTP_CANNOT_CALL_BEFORE_OPEN = 12100,
	ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND = 12101, ERROR_WINHTTP_CANNOT_CONNECT = 12029, ERROR_WINHTTP_CHUNKED_ENCODING_HEADER_SIZE_OVERFLOW = 12183,
	ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED = 12044, ERROR_WINHTTP_CONNECTION_ERROR = 12030, ERROR_WINHTTP_HEADER_ALREADY_EXISTS = 12155, 
	ERROR_WINHTTP_HEADER_COUNT_EXCEEDED = 12181, ERROR_WINHTTP_HEADER_NOT_FOUND = 12150, ERROR_WINHTTP_HEADER_SIZE_OVERFLOW = 12182,
	ERROR_WINHTTP_INCORRECT_HANDLE_STATE = 12019, ERROR_WINHTTP_INCORRECT_HANDLE_TYPE = 12018, ERROR_WINHTTP_INTERNAL_ERROR = 12004, 
	ERROR_WINHTTP_INVALID_OPTION = 12009, ERROR_WINHTTP_INVALID_QUERY_REQUEST = 12154, ERROR_WINHTTP_INVALID_SERVER_RESPONSE = 12152, 
	ERROR_WINHTTP_INVALID_URL = 12005, ERROR_WINHTTP_LOGIN_FAILURE = 12015, ERROR_WINHTTP_NAME_NOT_RESOLVED = 12007, 
	ERROR_WINHTTP_NOT_INITIALIZED = 12172, ERROR_WINHTTP_OPERATION_CANCELLED = 12017, ERROR_WINHTTP_OPTION_NOT_SETTABLE = 12011, 
	ERROR_WINHTTP_OUT_OF_HANDLES = 12001, ERROR_WINHTTP_REDIRECT_FAILED = 12156, ERROR_WINHTTP_RESEND_REQUEST = 12032, 
	ERROR_WINHTTP_RESPONSE_DRAIN_OVERFLOW = 12184, ERROR_WINHTTP_SCRIPT_EXECUTION_ERROR = 12177, ERROR_WINHTTP_SECURE_CERT_CN_INVALID = 12038, 
	ERROR_WINHTTP_SECURE_CERT_DATE_INVALID = 12037, ERROR_WINHTTP_SECURE_CERT_REV_FAILED = 12057, ERROR_WINHTTP_SECURE_CERT_REVOKED = 12170, 
	ERROR_WINHTTP_SECURE_CERT_WRONG_USAGE = 12179, ERROR_WINHTTP_SECURE_CHANNEL_ERROR = 12157, ERROR_WINHTTP_SECURE_FAILURE = 12175, 
	ERROR_WINHTTP_SECURE_INVALID_CA = 12045, ERROR_WINHTTP_SECURE_INVALID_CERT = 12169, ERROR_WINHTTP_SHUTDOWN = 12012,
	ERROR_WINHTTP_TIMEOUT = 12002, ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT = 12167, ERROR_WINHTTP_UNHANDLED_SCRIPT_TYPE = 12176,
	ERROR_WINHTTP_UNRECOGNIZED_SCHEME = 12006
};

#endif